package com.liuda066.forumssm.utils;


import org.apache.commons.codec.digest.DigestUtils;

/**
 * @author : niu niu
 * @version : 1.0.0
 * @date : 2023/9/1 21:41
 */
public class MD5Utils {
    /**
     * ⼀次MD5加密后的密⽂
     * @param str
     * @return
     */
    public static String md5(String str){
        return DigestUtils.md5Hex(str);
    }
    public static String md5Salt(String str,String salt){
        String s =  DigestUtils.md5Hex(str);
        String ciphertext = DigestUtils.md5Hex(s + salt);
        return ciphertext;
    }
}
